/*
 * @Description: 登记相关路由
 * @Author: Rfan
 * @Date: 2022-06-01 20:06:39
 * @LastEditTime: 2022-12-08 15:39:56
 */

import { lazy } from 'react';
import Layout from '@/layout';
import lazyLoad from '../components/lazyLoad';

export const registrationTransfer = lazy(
  () => import(/* webpackChunkName: "Registration" */ '@/view/registration/Transfer/TransferMain')
);

export const registrationAccession = lazy(
  () => import(/* webpackChunkName: "Registration" */ '@/view/registration/Accession/AccessionMain')
);

export const registrationCatalogue = lazy(
  () => import(/* webpackChunkName: "Registration" */ '@/view/registration/Catalogue/CatalogueMain')
);

export const registrationConversion = lazy(
  () =>
    import(/* webpackChunkName: "Registration" */ '@/view/registration/Conversion/ConversionMain')
);

export const registrationArchiving = lazy(
  () => import(/* webpackChunkName: "Registration" */ '@/view/registration/Archiving/ArchivingMain')
);

export const registrationERecordStorage = lazy(
  () =>
    import(
      /* webpackChunkName: "Registration" */ '@/view/registration/ERecordStorage/ERecordStorageMain'
    )
);

export const registrationDetection = lazy(
  () => import(/* webpackChunkName: "Registration" */ '@/view/registration/Detection/DetectionMain')
);

export const registrationMicroform = lazy(
  () => import(/* webpackChunkName: "Registration" */ '@/view/registration/Microform/MicroformMain')
);

export const registrationBaseInfo = lazy(
  () => import(/* webpackChunkName: "Registration" */ '@/view/registration/BaseInfo/BaseInfoMain')
);

export const registrationDestruction = lazy(
  () =>
    import(/* webpackChunkName: "Registration" */ '@/view/registration/Destruction/DestructionMain')
);

export const registrationDiskMgt = lazy(
  () => import(/* webpackChunkName: "Registration" */ '@/view/registration/DiskMgt/DiskMgtMain')
);

const managementRoutes: any[] = [
  {
    path: '/registration',
    element: <Layout />,
    meta: {
      title: '档案管理登记'
    },
    children: [
      {
        path: 'transfer',
        element: lazyLoad(registrationTransfer),
        meta: {
          title: '移交登记表'
        }
      },
      {
        path: 'accession',
        element: lazyLoad(registrationAccession),
        meta: {
          title: '接收登记表'
        }
      },
      // {
      //   path: 'catalogue',
      //   element: lazyLoad(registrationCatalogue),
      //   meta: {
      //     title: '目录登记簿'
      //   }
      // },
      {
        path: 'conversion',
        element: lazyLoad(registrationConversion),
        meta: {
          title: '档案转换与迁移'
        }
      },
      {
        path: 'archiving',
        element: lazyLoad(registrationArchiving),
        meta: {
          title: '电子文件归档'
        }
      },
      {
        path: 'e-record-storage',
        element: lazyLoad(registrationERecordStorage),
        meta: {
          title: '电子档案存储格式'
        }
      },
      {
        path: 'detection',
        element: lazyLoad(registrationDetection),
        meta: {
          title: '规范性检测'
        }
      },
      {
        path: 'microform',
        element: lazyLoad(registrationMicroform),
        meta: {
          title: '微缩品质量检测'
        }
      },
      {
        path: 'baseinfo',
        element: lazyLoad(registrationBaseInfo),
        meta: {
          title: '档案基本信息及案卷外观调查'
        }
      },
      {
        path: 'destruction',
        element: lazyLoad(registrationDestruction),
        meta: {
          title: '电子档案销毁'
        }
      },
      {
        path: 'disk-mgt',
        element: lazyLoad(registrationDiskMgt),
        meta: {
          title: '磁性载体管理'
        }
      }
    ]
  }
];

export default managementRoutes;
